From 87cf0c7b0abd8a128f8df2137cf52ef233c0a6cc Mon Sep 17 00:00:00 2001 From: "cl349@firebug.cl.cam.ac.uk" Date: Wed, 14 Sep 2005 13:37:03 +0000 Subject: [PATCH] Move uuid back into main domain dir. Signed-off-by: Christian Limpach --- tools/python/xen/xend/XendDomain.py | 2 +- tools/python/xen/xend/XendDomainInfo.py | 4 +++- tools/python/xen/xend/image.py | 1 - 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/python/xen/xend/XendDomain.py b/tools/python/xen/xend/XendDomain.py index 9ee5cb57fa..1464e488ae 100644 --- a/tools/python/xen/xend/XendDomain.py +++ b/tools/python/xen/xend/XendDomain.py @@ -142,7 +142,7 @@ class XendDomain: domdb.delete() elif domid in doms: try: - self._new_domain(db.uuid, db, doms[domid]) + self._new_domain(domdb["uuid"].getData(), db, doms[domid]) except Exception, ex: log.exception("Error recreating domain info: id=%d", domid) self._delete_domain(domid) diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index 8ac581241d..5b5dca60d6 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -205,7 +205,6 @@ class XendDomainInfo: __exports__ = [ DBVar('id', ty='int'), DBVar('name', ty='str'), - DBVar('uuid', ty='str'), DBVar('config', ty='sxpr'), DBVar('start_time', ty='float'), DBVar('state', ty='str'), @@ -219,6 +218,7 @@ class XendDomainInfo: def __init__(self, uuid, path, db): self.uuid = uuid self.path = path + "/" + uuid + self.db = db self.recreate = 0 @@ -264,6 +264,8 @@ class XendDomainInfo: self.bootloader = None self.device_model_pid = 0 + xstransact.Write(self.path, "uuid", self.uuid) + def setDB(self, db): self.db = db diff --git a/tools/python/xen/xend/image.py b/tools/python/xen/xend/image.py index 1c0dabfade..cd9c625a68 100644 --- a/tools/python/xen/xend/image.py +++ b/tools/python/xen/xend/image.py @@ -155,7 +155,6 @@ class ImageHandler: if dom <= 0: raise VmError('Creating domain failed: name=%s' % self.vm.name) log.debug("initDomain: cpu=%d mem_kb=%d ssidref=%d dom=%d", cpu, mem_kb, ssidref, dom) - # xc.domain_setuuid(dom, uuid) xc.domain_setcpuweight(dom, cpu_weight) xc.domain_setmaxmem(dom, mem_kb) -- 2.30.2